package lanxing.future.base.chapter10;

/**
 * @author <a href="mailto:lanxing@chances.com.cn">lanxing</a>
 * @version 2019年8月3日
 *
 */
public class Parcel10 {
    public Destination destination(String dest, float price,Base base) {
        return new Destination() {
            private int cost;
            {
                cost = Math.round(price);
                if (cost > 100) {
                    System.out.println("over budget");
                }

            }
            
            private String label = dest;
            public String readLabel() {return label;}
        };
    }
    
    public static void main(String[] args) {
        Parcel10 p = new Parcel10();
        
        p.destination("lanxing10", 100.6f,null);
    }
    
}
